/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.techshop.controller.themes;

import java.io.Serializable;
import java.util.Map;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.context.FacesContext;

/**
 *
 * @author Hai-PC
 */
@ManagedBean(name="guestPreferences")
@SessionScoped
public class GuestPreferences implements Serializable
{    
    private String theme = "flick"; //Default theme
    
    public String getTheme()
    {
        Map<String,String> params = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
        if (params.containsKey("theme"))
        {
            theme = params.get("theme");
        }
        return theme;
    }
    
    public void setTheme(String theme)
    {
        this.theme = theme;
    }
}